package com.smartmedical.patient.sickcricle.mapper;

import com.smartmedical.common.core.domain.HealthR;
import com.smartmedical.patient.sickcricle.domain.SickCircle;
import com.smartmedical.patient.sickcricle.domain.SickCircleComment;
import com.smartmedical.patient.sickcricle.domain.SickCircleCount;
import com.smartmedical.patient.sickcricle.vo.SickCircleCommentVo;
import com.smartmedical.patient.sickcricle.vo.SickCirclePublishVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Mapper
@Component
public interface SickCollectionMapper {



    String selectUserNameDoc(@Param("username") String username);

    Integer publishComment(SickCircleComment sickCircleComment);

    void adoptionProposal(@Param("sickCircleId") Integer sickCircleId, @Param("commentId") Integer commentId);


    Integer addUserSickCollection(SickCircleCount sickCircleCount);

    Integer cancelSickCollection(SickCircleCount sickCircleCount);

    List<SickCirclePublishVo> findMySickCircleList(@Param("userId") Long userId,
                                                   @Param("page") Integer page,
                                                   @Param("count") Integer count);

    List<SickCircleCommentVo> findSickCircleCommentList(@Param("sickCircleId") Integer sickCircleId,
                                                        @Param("page") Integer page,
                                                        @Param("count") Integer count);


    Integer publishSickCircle(SickCircle sickCircle);

    Integer expressOpinion(@Param("commentId") Integer commentId, @Param("opinion") Integer opinion);


    Integer findByOpinion(@Param("commentId") Integer commentId);

    Integer addSupportNum(@Param("commentId") Integer commentId);

    Integer addOpposeNum(@Param("commentId") Integer commentId);

    void cancleOpposeNum(@Param("commentId") Integer commentId);
}
